var TigerManageAd04 = {
		
	load : function () {
		var user = getUser();
		Ext.getDom("notifyBudgetUpdate").checked = user.NotifyBudgetUpdate ==1;
		Ext.getDom("notifyAdApprovedNot").checked = user.NotifyAdApprovedNot ==1;
		Ext.getDom("notifyAdModify").checked = user.NotifyAdModify ==1;
		Ext.getDom("notifyAdApproved").checked = user.NotifyAdApproved ==1;
		Ext.getDom("notifyPayComplete").checked= user.NotifyPayComplete ==1;
		this.eventRegister();
	},
	 
	eventRegister : function () {
	    Ext.get("btnConfirm").on('click',this.confirm);
	}, 
	
	 
	
	confirm : function () {
		if (confirm("確認修改通知設定?")) {
			 
			waitShow("修改通知設定,請稍待....")
			Ext.Ajax.request({
				method : "POST",
		     	form : "form",
		     	callback : function (options, se, rsp) {
		    		waitHide();
		    		var obj = rsp.responseText.toJSON();  
		    		 
		    		if (obj.result =="1") {
		    			alert("修改設定成功!");
		    		} else{
		    			alert("修改設定失敗!");
		    		}
		    	}
			}); 	
		}
	}
};

Ext.onReady(function (){
	TigerManageAd04.load();
});


